package com.gwfd.mes.app.service;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gwfd.mes.app.core.def.mapper.WeakMapper;

import org.springframework.beans.factory.annotation.Autowired;


import java.util.List;

/**
 * @author 张照威
 * @date 2021/4/12
 * @mail 865533614@qq.com
 * @describe
 */
public abstract class WeakService<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements WorkIService<T> {

    @Autowired
    private WeakMapper<T> weakMapper;

    /**
     * 新增
     * @param entity
     * @return
     */
    protected int insert(T entity) throws Exception {
        return 0;
    }

    /**
     * 批量新增
     * @param entityList
     * @return
     */
    protected boolean insertBatch(List<T> entityList) throws Exception {
        return true;
    }



}
